<!DOCTYPE html>
<html lang="en">
<head>
    <title>京伦内容管理系统</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="__PUBLIC__/bootstrap/css/bootstrap.min.css" />
    <load href="__PUBLIC__/bootstrap/js/jquery.min.js" />
    <load href="__PUBLIC__/bootstrap/js/bootstrap.min.js" />
    <script type="text/javascript">
        $(document).ready(function(){
            $('#collapseTwo').addClass('in');
            $('#collapseOne').removeClass('in');
        });
    </script>
</head>
<body>

<!-- header -->
<include file="Public:header" />



<div class="row">
    <!-- left -->
    <include file="User:left" />

    <div class="col-md-8" style="padding-top: 70px;">
        
            <ol class="breadcrumb">
                <li><a href="#">Home</a></li>
                <li><a href="#">System</a></li>
                <li class="active">{$pagetitle}</li>
            </ol>
        

        <div class="actions clearfix">
            <div class="pull-left">
                <a href="{:U('Auth/accessAdd')}"><button type="button" class="btn  btn-primary">添加权限</button></a>
                <a href="{:U('Auth/groupList')}"><button type="button" class="btn  btn-primary">角色管理</button></a>
            </div>
        </div>

        <div>
            <div id="content" >
                <ul class="nav nav-tabs" id="myTab" style="margin-top:20px;">
                    <li class="active"><a href="#groupList" data-toggle="tab">角色列表</a></li>
                    <li><a href="#groupAdd" data-toggle="tab">添加角色</a></li>
                </ul>

                <!-- Tab panes -->
                <div class="tab-content" style="margin-top:20px;">
                    <div class="tab-pane fade in active" id="groupList">
                        <table class="table table-hover table-striped">
                            <tr>
                                <td>序号</td>
                                <td>角色名称</td>
                                <td>角色描述</td>
                                <td>状态</td>
                                <td>操作</td>
                            </tr>
                            <volist name="data" id="vo">
                                <tr>
                                    <td>{$i+$num}</td>
                                    <td>{$vo['title']}</td>
                                    <td>{$vo['describe']}</td>
                                    <td><if condition="$vo['status'] eq 1"><span class="label label-success"><i class="glyphicon glyphicon-ok"></i></span>
                                        <else />
									<span class="label label-danger">
									<i class="glyphicon glyphicon-remove"></i></span>
                                    </if></td>
                                    <td>
                                     <div class="btn-group btn-group-sm">
                                     <a class="btn btn-primary" href="{:U('Admin/Auth/accessSelect',array('id'=>$vo['id'],'name'=>$vo['title']))}">权限设置</a>
                                            <a class="btn btn-info" href="{:U('Admin/Auth/groupMember',array('id'=>$vo['id'],'name'=>$vo['title']))}">成员管理</a>
                                       </div>
                                        <div class="btn-group btn-group-sm">
                                           
                                            <a class="btn btn-warning" href="{:U('Auth/modgroup',array('id'=>$vo['id']))}">修改</a>
                                            <a class="btn btn-danger" href="{:U('Auth/deletegroup',array('id'=>$vo['id']))}">删除</a>
                                        </div>
                                    </td>
                                </tr>
                            </volist>

                        </table>
                        <tr>
                            <td colspan='5'>{$page}</td>
                        </tr>

                    </div>
                    <div class="tab-pane fade" id="groupAdd">
                        <form class="form-horizontal" action="{:U('Admin/Auth/groupAddHandle')}" method='post'>
                            <div class="form-group">
                                <label for="groupName" class="col-sm-2 control-label">角色名称:</label>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control" placeholder="角色名称" name="groupName" id="groupName" />
                                </div>
                                <label class="col-sm-2 control-label"></label>
                            </div>

                            <div class="form-group">
                                <label for="describe" class="col-sm-2 control-label">角色描述:</label>
                                <div class="col-sm-5">
                                    <input type="text" class="form-control" placeholder="角色描述" name="describe" id="describe" />
                                </div>
                                <label class="col-sm-2 control-label"></label>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">是否启用:</label>
                                <div class="btn-group col-sm-5" data-toggle="buttons">
                                    <label class="btn btn-primary">
                                        <input type="radio"  name="status" id="status" checked="checked" value="1" />启用
                                    </label>

                                    <label class="btn btn-danger">
                                        <input type="radio"  name="status" id="status" value="0" />禁用
                                    </label>
                                </div>
                                <label class="col-sm-2 control-label"></label>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label"></label>
                                <div class="col-sm-5">
                                    <button type="submit" class="btn btn-success btn-add">添加</button>

                                </div>

                            </div>

                        </form>

                    </div>
                </div>
            </div>
        </div>

    </div>
</div>





</body>
</html>
